<template>
  <div class="article" @click="changeValue">
    article{{ a }}{{ b }}{{ sum }}
    <xyTree :treeData="treeData" @changeI="changeI"></xyTree>
  </div>
</template>

<script>
import mixin from './mixin'
import xyTree from '@/components/tree/xyTree.vue'
export default {
  mixins: [mixin],
  name: 'articleView',
  components: {
    xyTree,
  },
  data() {
    return {
      treeData: [
        {
          name: '1',
          child: [
            { name: ' 1 - 1' },
            {
              name: '1 - 2',
              child: [{ name: ' 1 -2-1' }, { name: '1 - 2-2' }],
            },
          ],
        },
        { name: '2', child: [{ name: ' 2 - 1' }, { name: ' 2 - 2' }] },
      ],
    }
  },
  computed: {},
  methods: {
    changeI(i) {
      console.log(i)
    },
  },
}
</script>
